<?php

class detalle extends object_standard {

    //attribute variables 
    protected $cantidad;
    protected $modelo;
    protected $orden_produccion;
    //components 
    var $components = array();
    //auxiliars for primary key and for files 
    var $auxiliars = array();

    //data about the attributes 
    public function metadata() {
        return array("cantidad" => array(), "modelo" => array("foreign_name" => "m_d", "foreign" => "modelo", "foreign_attribute" => "codigo"),
            "orden_produccion" => array("foreign_name" => "op_d", "foreign" => "orden_produccion", "foreign_attribute" => "codigo"));
    }

    public function relational_keys($class, $rel_name) {
        switch ($class) {
            case "modelo":
                switch ($rel_name) {
                    case "m_d":
                        return array("modelo");
                    default :
                        break;
                }
                break;
            case "orden_produccion" :
                switch ($rel_name) {
                    case "op_d":
                        return array("orden_produccion");
                    default:
                        break;
                }
                break;
            default :
                break;
        }
    }
}
?>